package entity;

import java.util.*;

import representation.RepresentationManager;


public class EntityManager {

	private List<Entity> entities;
	private RepresentationManager representations;;
	
	public EntityManager(RepresentationManager representations) {
		this.entities = new ArrayList<Entity>();
		this.representations = representations;
	}
	
	public void addEntity(Entity entity) {
		this.entities.add(entity);
		this.representations.addEntity(entity.getRepresentation());
	}
	
	public void removeEntity(Entity entity) {
		this.entities.remove(entity);
	}
	
	public void update() {
		for (Entity e : entities) {
			e.update();
		}
	}
	
}
